import React from 'react';
import {Text, View} from 'react-native';
// StackRouter.js
import {createNativeStackNavigator} from '@react-navigation/native-stack';
const Stack = createNativeStackNavigator();
import home from '@/pages/home';
import page1 from '@/pages/page1';
import page2 from '@/pages/page2';
import page3 from '@/pages/page3';
export default function StackRouter() {
  return (
    <Stack.Navigator>
      <Stack.Screen name="Home" component={home} />
      <Stack.Screen
        name="page1"
        component={page1}
        options={{
          title: '页面1',
          headerStyle: {
            height: 80,
            backgroundColor: '#2196F3',
          },
        }}
      />
      <Stack.Screen
        name="page2"
        component={page2}
        options={{
          title: '页面2',
          headerStyle: {
            height: 80,
            backgroundColor: '#2196F3',
          },
        }}
      />
      <Stack.Screen
        name="page3"
        component={page3}
        options={{
          title: '页面3',
          headerStyle: {
            height: 80,
            backgroundColor: '#2196F3',
          },
        }}
      />
    </Stack.Navigator>
  );
}
